/* eslint-disable */
import React, { useState, useEffect } from 'react';
import { Form, Select, Input, Button, message, Radio, Row, Col, Tooltip } from 'antd';
import {
  apkOssUploadAndFormInfo,
  apkUploadFormSelectTemplate,
  apkUploadFormSelectEquipment,
  applicationAppOnline,
  getAssetsCompanyData,
  getAssetsDepartmentData,
} from '../../../request/request';
import { getOssBucketAndPath, commonFileUpload } from '@/utils/fileUploadMethod.js';
import api from '../../../request/api';
import { withRouter } from 'react-router-dom';
import { get } from 'lodash';
import moment from 'moment';
const { Option } = Select;
const { TextArea } = Input;

const ApkUploadForm = (props) => {
  const { companyList, aplicationType, taskType, isOnline, useAPPLEID } = props;
  const { ext } = props.uploadFileInfo;
  const [privacyPolicy, setPrivacyPolicy] = useState(1); // 控制隐私政策 链接/文本
  const [isShowLoading, setShowLoading] = useState(false); // 是否显示提交loading
  const [templateArr, setTemplateArr] = useState([]); // 检测模板数据
  const [isDisableTemp, setDisableTemp] = useState(true); // 是否禁用
  const [uploadType, setUploadType] = useState('sdk'); // 设置上传类型
  const [selectSchema, setSelectSchema] = useState(); // 当前检测模式
  const [equipment, setEquipment] = useState([]); // 设备信息公共数据

  // 企业和部门内信息
  const [enterprise, setEnterprise] = useState([]); // 企业数组数据
  const [department, setDepartment] = useState([]); // 部门数组数据
  const [enterpriseValue, setEnterpriseValue] = useState(null);
  const [departmentValue, setDepartmentValue] = useState(-1);
  const [isDepartment, setIsDepartment] = useState(true);

  // 获取企业信息
  const getEnterprisesData = async () => {
    let data = await getAssetsCompanyData({ page: 1, pageSize: 10000 });
    if (data) {
      setEnterprise(data.all);
    }
  };
  // 获取部门信息
  const getDepartmentData = async (internal_company) => {
    let obj = { page: 1, pageSize: 10000 }
    if (internal_company) {
      obj.internal_company = internal_company;
    }
    let data = await getAssetsDepartmentData(obj);
    if (data) {
      setDepartment(data.all);
      if (data.all.length > 0) {
        const first = data.all[0];
        setDepartmentValue(first.id);
      } else {
        setDepartmentValue(-1);
      }
    }
  };

  // 企业部门选择
  const enperpriseChange = async (value) => {
    setEnterpriseValue(value);
    if (value) {
      setIsDepartment(false);
      await getDepartmentData(value);
    } else {
      setIsDepartment(true);
      setDepartmentValue([]);
    }
  }
  const departmentChange = (value) => {
    setDepartmentValue(value);
  }

  useEffect(() => {
    getEnterprisesData();
    setDepartmentValue();
  }, [])

  useEffect(() => {
    (async() => {
      if (taskType === 'applet') {
        await detectionSchema(1);
      }
    })();
  }, [taskType])

  const handleSubmit = async (obj) => {
    // 最终提交
    const { setShowUploadPanel, setCurrent, setDragger, setTimeView, getPowerInformation, setUseAPPLEID, setIsOnline, setIosCheckStatus } = props;
    const isSubmit = await apkOssUploadAndFormInfo(obj);
    setShowUploadPanel(false);
    setCurrent(0);
    setDragger(false); //数据清空
    setShowLoading(false);
    setUseAPPLEID('');
    setIosCheckStatus([]);
    setIsOnline(false);
    if (isSubmit) {
      // 重新获取table表
      getPowerInformation();
      setTimeView([moment(moment().subtract(1, 'months'), 'YYYY/MM/DD'), moment(new Date(), 'YYYY/MM/DD')]); // 时间恢复近一个月
    }
  };

  const createSubmitObj = (path, filename, values) => {
    // 拼接上传对象
    let newAplicationType = aplicationType;
    if (!Array.isArray(newAplicationType)) {
      newAplicationType = [];
    }
    let arrClone = JSON.parse(JSON.stringify(newAplicationType));
    let arr = arrClone.filter((item) => item.id === values.industry);
    if (!values.taskDescription) {
      values.taskDescription = '';
    }
    let rule_name = arr[0]?.rule_name;

    let obj = {
      path,
      fileName: filename,
      company_id: values.company_id,
      policy_module_id_list: values.policy_module_id_list,
      industry: rule_name,
      baseline_rule_id: values.industry,
      taskReviewer: values.taskReviewer,
      taskDescription: values.taskDescription,
      mobile_serial: values.mobile_serial,
      policy: privacyPolicy === 1 ? { url: values.url } : { text: values.text },
      detection_mode: values.detection_mode,
      detection_type: 'privacy',
      internal_department_id: (!values?.internal_department_id || parseInt(values?.internal_department_id) === -1) ? '' : values?.internal_department_id,
    };
    // sdk、小程序字段
    if (values?.app_platform) {
      obj.app_platform = values?.app_platform;
      obj.app_name = values?.app_name;
      obj.app_version = values?.app_version;
      obj.package_features = values?.package_features;
      obj.scan_domain_name = values?.scan_domain_name;
    }
    console.log(obj);
    handleSubmit(obj);
  };

  const ossSubmit = (e) => {
    // OSS上传流程
    e.preventDefault();
    props.form.validateFields(async (err, values) => {
      if (!err) {
        if (taskType === 'application' && isOnline) {
          const { setOpenUploadModal, setShowUploadPanel, setCurrent, setDragger, setTimeView, getPowerInformation, setUseAPPLEID, setIsOnline, setIosCheckStatus } = props;
          const res = await applicationAppOnline({
            company_id: values.company_id,
            policy_module_id_list: values.policy_module_id_list,
            taskReviewer: values.taskReviewer,
            taskDescription: values.taskDescription,
            mobile_serial: values.mobile_serial,
            policy: privacyPolicy === 1 ? { url: values.url } : { text: values.text },
            detection_mode: values.detection_mode,
            detection_type: 'privacy',
            is_online: true,
            app_id: useAPPLEID,
          });
          if (res) {
            setShowUploadPanel(false);
            setOpenUploadModal(false);
            setIosCheckStatus([]);
            setCurrent(0);
            setUseAPPLEID('');
            setIsOnline(false);
            setDragger(false); //数据清空
            setShowLoading(false);
            // 重新获取table表
            getPowerInformation();
            setTimeView([moment(moment().subtract(1, 'months'), 'YYYY/MM/DD'), moment(new Date(), 'YYYY/MM/DD')]); // 时间恢复近一个月
          }
          return
        }
        if (taskType === 'applet') {
          const { setOpenUploadModal, setShowUploadPanel, setCurrent, setDragger, setTimeView, getPowerInformation, setUseAPPLEID, setIsOnline, setIosCheckStatus } = props;
          const res = await applicationAppOnline({
            app_platform: 'small_program',
            app_name: values.app_name,
            app_version: values.app_version,
            policy_module_id_list: values.policy_module_id_list,
            detection_mode: '0',
            detection_type: 'privacy',
          });
          if (res) {
            setShowUploadPanel(false);
            setOpenUploadModal(false);
            setIosCheckStatus([]);
            setCurrent(0);
            setUseAPPLEID('');
            setIsOnline(false);
            setDragger(false); //数据清空
            setShowLoading(false);
            // 重新获取table表
            getPowerInformation();
            setTimeView([moment(moment().subtract(1, 'months'), 'YYYY/MM/DD'), moment(new Date(), 'YYYY/MM/DD')]); // 时间恢复近一个月
          }
          return
        }
        const { setOpenUploadModal, setUploadProgress, setShowUploadPanel, checkedItem, setIsUploadPanel, setCurrent, setDragger } = props;
        const { fileMd5, filename, fileListArr, oss_key } = props.uploadFileInfo;
        try {
          setShowLoading(true);
          // 选择app历史记录上传
          if (checkedItem) {
            setOpenUploadModal(false);
            setShowUploadPanel(true);
            setIsUploadPanel(true);
            setUploadProgress(100);
            createSubmitObj(oss_key, filename, values);
            return;
          }
          //获取bucket
          const ossBucket = await getOssBucketAndPath(api.getOssBucketAndPath, fileMd5, filename);
          if (!ossBucket) {
            setShowLoading(false);
            return;
          }
          // 获取Token
          const { bucket, path, uploaded } = ossBucket;
          if (uploaded) {
            // 是否已经上传
            setOpenUploadModal(false);
            setShowUploadPanel(true);
            setIsUploadPanel(true);
            setUploadProgress(100);
            setShowLoading(false);
            createSubmitObj(path, filename, values);
            return;
          }

          // 融合minIo与aliOSS
          const isUpload = await commonFileUpload(bucket, path, fileListArr, (progress) => {
            setOpenUploadModal(false);
            setShowUploadPanel(true);
            setUploadProgress(progress * 100);
          });
          if (isUpload && isUpload?.status === 200) {
            console.log('上传成功');
            setUploadProgress(100);
            setShowLoading(false);
            createSubmitObj(path, filename, values);
          } else {
            setShowUploadPanel(false);
            setCurrent(0);
            setDragger(false); //数据清空
            setShowLoading(false);
          }
        } catch (error) {
          const { response = {} } = error;
          const msg = get(response, 'data.msg', 'OSS上传失败');
          message.error(msg);
          console.error(error);
        }
      }
    });
  };

  const onPrivacyPolicyChange = (e) => {
    setPrivacyPolicy(e.target.value);
  };

  // 检测模式更改
  const detectionSchema = async (value) => {
    let str = '';
    let equipmentObj = { size: 999 };
    switch (value) {
      case 1:
        str = 'manual';
        equipmentObj.manual = 1;
        break;
      case 0:
        str = 'machine';
        equipmentObj.machine = 1;
        break;
    }
    // 修改检测模式
    setSelectSchema(str);
    // 上传类型 安卓、IOS、SDK、小程序
    let platform_module;
    switch (ext) {
      case 'apk':
        platform_module = 'android';
        break;
      case 'ipa':
        platform_module = 'ios';
        break;
      default:
        platform_module = uploadType;
        break;
    }
    if (isOnline && taskType === 'application') {
      platform_module = 'ios';
    }
    let templateObj = {}
    if (taskType === 'applet') {
      templateObj = {
        pattern_module: str,
        platform_module: 'small_program',
      };
    } else {
      templateObj = {
        pattern_module: str,
        platform_module,
        detection_type: 'privacy',
      };
    }

    equipmentObj.platform = platform_module;
    if (platform_module === 'android' || platform_module === 'ios') {
      const [data, equipment] = await Promise.all([
        apkUploadFormSelectTemplate(templateObj),
        apkUploadFormSelectEquipment(equipmentObj),
      ]);
      if (data && equipment) {
        props.form.resetFields(['policy_module_id_list', 'mobile_serial']);
        setEquipment(equipment);
        setTemplateArr(data);
        setDisableTemp(false);
      }
    } else {
      const data = await apkUploadFormSelectTemplate(templateObj);
      if (data) {
        props.form.resetFields('policy_module_id_list');
        setTemplateArr(data);
        setDisableTemp(false);
      }
    }
  };

  // 点击提示
  const detectionClick = () => {
    let detection_mode_value = props.form.getFieldValue('detection_mode');
    if (![0, 1].includes(detection_mode_value) && taskType !== 'applet') {
      message.warning('请先选择检测模式');
    }
  };

  // 基线规则配置跳转
  const rulesConfig = () => {
    props.history.push({
      pathname: '/privacy/permission/behavior',
    });
  };

  // 设置上传类型
  const changeUploadType = async (value) => {
    props.form.setFieldsValue({
      app_platform: value,
    });
    // 如已存在检测模式，则请求检测模板
    if (selectSchema) {
      let obj = {
        pattern_module: selectSchema,
        platform_module: value,
      };
      const data = await apkUploadFormSelectTemplate(obj);
      if (data) {
        props.form.resetFields('policy_module_id_list');
        setTemplateArr(data);
      }
    }
    setUploadType(value);
  };

  const { getFieldDecorator } = props.form;

  // 当前是否为IOS/Android包
  const isApkIos = ext === 'apk' || ext === 'ipa' || (isOnline && taskType === 'application');
  // 当前上传类型
  const isShowType = uploadType === 'sdk' ? true : false;
  return (
    <div>
      <Form onSubmit={ossSubmit} layout="inline" style={{ paddingTop: 35 }}>
        <Row>
          {
            taskType === 'applet' ? (
              <Row className="applet_detection_applet">
                <Col span={24}>
                  <Form.Item label="小程序名称" className="align-item">
                    {
                      getFieldDecorator('app_name', {
                        rules: [
                          { required: true, message: '请输入小程序名称'}
                        ]
                      })(<Input placeholder="请输入小程序名称" allowClear />)
                    }
                  </Form.Item>
                </Col>
                <Col span={24}>
                  <Form.Item label="版本号" className="align-item">
                    {
                      getFieldDecorator('app_version', {
                        rules: [
                          {
                            required: true,
                            message: '请输入小程序版本',
                          },
                        ],
                      })(<Input placeholder="请输入小程序版本" />)
                    }
                  </Form.Item>
                </Col>
                <Col span={24}>

                  <Form.Item label="检测模式" className="align-item">
                    <Input disabled value={"人测"} />
                  </Form.Item>
                </Col>
                <Col span={24}>
                  <Form.Item label="检测模板" onClick={detectionClick} className="align-item">
                    {getFieldDecorator('policy_module_id_list', {
                      rules: [
                        {
                          required: true,
                          message: '请选择检测模板',
                        },
                      ],
                    })(
                      <Select
                        showSearch
                        mode="multiple"
                        optionFilterProp="children"
                        filterOption={(input, option) =>
                          option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0
                        }
                        style={{ width: 624 }}
                        placeholder="请选择检测模板"
                        disabled={isDisableTemp}
                      >
                        {templateArr.map((item) => (
                          <Option key={item.id} value={item.id}>
                            {item.policy_module_name}
                          </Option>
                        ))}
                      </Select>,
                    )}
                  </Form.Item>
                </Col>
              </Row>
            ) : (
              <>
                {!isApkIos && (
                  <Row>
                    <Col span={24} className="align-position">
                      <Form.Item label="上传类型" className="align-item">
                        {getFieldDecorator('app_platform', {
                          initialValue: uploadType,
                          rules: [
                            {
                              required: true,
                              message: '请选择上传类型',
                            },
                          ],
                        })(
                          <Select style={{ width: 250 }} placeholder="请选择上传类型" onChange={changeUploadType}>
                            <Option value="sdk">SDK</Option>
                            <Option value="small_program">小程序</Option>
                          </Select>,
                        )}
                      </Form.Item>
                    </Col>
                    <Col span={12} style={isShowType ? { paddingLeft: 32 } : { paddingLeft: 16 }}>
                      <Form.Item label={isShowType ? 'SDK名称' : '小程序名称'} className="align-item">
                        {isShowType
                          ? getFieldDecorator('app_name', {
                            rules: [
                              {
                                required: true,
                                message: '请输入SDK名称',
                              },
                            ],
                          })(<Input placeholder="请输入SDK名称" style={{ width: 250 }} />)
                          : getFieldDecorator('app_name', {
                            rules: [
                              {
                                required: true,
                                message: '请输入小程序名称',
                              },
                            ],
                          })(<Input placeholder="请输入小程序名称" style={{ width: 250 }} />)}
                      </Form.Item>
                    </Col>
                    <Col span={12} style={isShowType ? { paddingLeft: 22 } : { paddingLeft: 6 }}>
                      <Form.Item label={isShowType ? 'SDK版本' : '小程序版本'} className="align-item">
                        {isShowType
                          ? getFieldDecorator('app_version', {
                            rules: [
                              {
                                required: true,
                                message: '请输入SDK版本',
                              },
                            ],
                          })(<Input placeholder="请输入SDK版本" style={{ width: 250 }} />)
                          : getFieldDecorator('app_version', {
                            rules: [
                              {
                                required: true,
                                message: '请输入小程序版本',
                              },
                            ],
                          })(<Input placeholder="请输入小程序版本" style={{ width: 250 }} />)}
                      </Form.Item>
                    </Col>
                  </Row>
                )}
                <div style={{ paddingLeft: 30 }}>
                  {!isApkIos && (
                    <Form.Item label={isShowType ? '包名特征' : '扫描域名'}>
                      {isShowType
                        ? getFieldDecorator('package_features', {
                          rules: [
                            {
                              required: true,
                              message: '请输入包名特征',
                            },
                          ],
                        })(<Input placeholder="请输入包名特征" style={{ width: 624 }} />)
                        : getFieldDecorator('scan_domain_name', {
                          rules: [
                            {
                              required: true,
                              message: '请输入扫描域名',
                            },
                          ],
                        })(<Input placeholder="请输入扫描域名" style={{ width: 624 }} />)}
                    </Form.Item>
                  )}

                  <Form.Item label="检测模式" className="align-item">
                    {getFieldDecorator('detection_mode', {
                      rules: [
                        {
                          required: true,
                          message: '请选择检测模式',
                        },
                      ],
                    })(
                      <Select
                        showSearch
                        optionFilterProp="children"
                        filterOption={(input, option) =>
                          option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0
                        }
                        style={{ width: 624 }}
                        placeholder="请选择检测模式"
                        onChange={detectionSchema}
                      >
                        <Option value={1}>人测</Option>
                        <Option value={0}>机测</Option>
                      </Select>,
                    )}
                  </Form.Item>
                  <Form.Item label="检测模板" className="align-item" onClick={detectionClick}>
                    {getFieldDecorator('policy_module_id_list', {
                      rules: [
                        {
                          required: true,
                          message: '请选择检测模板',
                        },
                      ],
                    })(
                      <Select
                        showSearch
                        mode="multiple"
                        optionFilterProp="children"
                        filterOption={(input, option) =>
                          option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0
                        }
                        style={{ width: 624 }}
                        placeholder="请选择检测模板"
                        disabled={isDisableTemp}
                      >
                        {templateArr.map((item) => (
                          <Option key={item.id} value={item.id}>
                            {item.policy_module_name}
                          </Option>
                        ))}
                      </Select>,
                    )}
                  </Form.Item>
                </div>
                {/*
                  {isApkIos && (
                    <Col span={12} className="align-position">
                      <Form.Item label="基线规则" className="align-item" style={{ position: 'relative' }}>
                        {getFieldDecorator('industry', {
                          rules: [
                            {
                              required: true,
                              message: '请选择基线规则',
                            },
                          ],
                        })(
                          <Select
                            showSearch
                            optionFilterProp="children"
                            filterOption={(input, option) =>
                              option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0
                            }
                            style={{ width: 250 }}
                            placeholder="请选择基线规则"
                          >
                            {aplicationType.map((item) => {
                              return (
                                <Option key={item.id} value={item.id}>
                                  {item.baseline_rule_name}
                                </Option>
                              );
                            })}
                          </Select>,
                        )}
                        <a
                          onClick={() => rulesConfig()}
                          style={{ position: 'absolute', display: 'block', right: -32, top: -10 }}
                        >
                          配置
                        </a>
                      </Form.Item>
                    </Col>
                  )}
                */}
                <div>
                  <Row>
                    {isApkIos && (
                      <Col span={12} className="align-position">
                        <Form.Item label="执行设备" className="align-item" onClick={detectionClick}>
                          {getFieldDecorator('mobile_serial', {
                            initialValue: '',
                          })(
                            <Select
                              showSearch
                              optionFilterProp="children"
                              filterOption={(input, option) =>
                                option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0
                              }
                              style={{ width: 250 }}
                              placeholder="请选择执行设备"
                              disabled={isDisableTemp}
                            >
                              <Option value="">默认随机设备</Option>
                              {equipment.map((item) => {
                                let str = item.mobile_serial;
                                if (str.length >= 20) {
                                  str = item.mobile_serial.slice(0, 20) + '...';
                                }
                                return (
                                  <Option key={item.mobile_serial} value={item.mobile_serial}>
                                    <div style={{ display: 'flex', justifyContent: 'space-between' }}>
                                      <Tooltip title={item.mobile_serial}>{str}</Tooltip>
                                      {item.cast_panel_state === 'on' && (
                                        <div style={{ fontSize: 12, color: '#0084ff' }}>可投屏</div>
                                      )}
                                    </div>
                                  </Option>
                                );
                              })}
                            </Select>,
                          )}
                        </Form.Item>
                      </Col>
                    )}
                    <Col span={12} className="align-position">
                      <Form.Item
                        label={<span style={{ letterSpacing: 5 }}>开发商</span>}
                        className="align-item"
                        style={{ marginLeft: 10 }}
                      >
                        {getFieldDecorator('company_id')(
                          <Select
                            showSearch
                            optionFilterProp="children"
                            filterOption={(input, option) =>
                              option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0
                            }
                            style={{ width: 250 }}
                            placeholder="请选择开发商"
                          >
                            {companyList.map((item) => {
                              return (
                                <Option key={item.id} value={item.id}>
                                  {item.company_name}
                                </Option>
                              );
                            })}
                          </Select>,
                        )}
                      </Form.Item>
                    </Col>
                    <Col span={12} className="align-position">
                      <Form.Item label="检测人员" className="align-item">
                        {getFieldDecorator('taskReviewer', {
                          rules: [
                            {
                              message: '请输入检测人员',
                            },
                          ],
                        })(<Input placeholder="请输入检测人员" style={{ width: 250 }} />)}
                      </Form.Item>
                    </Col>
                  </Row>
                </div>
                <div>
                  <Row>
                    <Col span={12} className="align-position">
                      <Form.Item label={<span>所属企业</span>} className="align-item">
                        {getFieldDecorator('internal_company', {
                          initialValue: enterpriseValue,
                        })(
                          <Select
                            showSearch
                            optionFilterProp="children"
                            filterOption={(input, option) =>
                              option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0
                            }
                            style={{ width: 250 }}
                            placeholder="请选择企业"
                            onChange={ enperpriseChange }
                          >
                            {
                              enterprise.length && enterprise.map((item, index) => {
                                return (
                                  <Select.Option value={item.id} key={index}>{item.company_name}</Select.Option>
                                )
                              })
                            }
                          </Select>
                        )}
                      </Form.Item>
                    </Col>
                    <Col span={12} className="align-position">
                      <Form.Item label={<span>所属部门</span>} className="align-item" style={{ marginLeft: 10 }}>
                        {getFieldDecorator('internal_department_id', {
                          initialValue: departmentValue || -1,
                        })(
                          <Select
                            showSearch
                            optionFilterProp="children"
                            filterOption={(input, option) =>
                              option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0
                            }
                            style={{ width: 250 }}
                            placeholder="请选择所属部门"
                            disabled={isDepartment}
                            onChange={ departmentChange }
                          >
                            {
                              department.length && department.map((item, index) => {
                                return (
                                  <Select.Option value={item.id} key={index}>{item.depart_name}</Select.Option>
                                )
                              })
                            }
                            <Select.Option value={-1}>其他</Select.Option>
                          </Select>,
                        )}
                      </Form.Item>
                    </Col>
                  </Row>
                </div>
                <div style={{ paddingLeft: 40 }}>
                  <Form.Item label="任务描述">
                    {getFieldDecorator('taskDescription', {
                      rules: [
                        {
                          message: '请输入任务描述',
                        },
                      ],
                    })(<TextArea placeholder="请输入任务描述" style={{ width: 624 }} />)}
                  </Form.Item>
                  {isApkIos && (
                    <Form.Item label="隐私政策">
                      <div className="privacy-policy">
                        <Radio.Group onChange={onPrivacyPolicyChange} value={privacyPolicy}>
                          <Radio value={1}>链接</Radio>
                          <Radio value={2}>文本</Radio>
                        </Radio.Group>
                        {privacyPolicy === 1
                          ? getFieldDecorator('url')(<Input placeholder="请输入隐私政策URL地址" />)
                          : getFieldDecorator('text')(<TextArea placeholder="请输入隐私政策文本" />)}
                      </div>
                    </Form.Item>
                  )}
                </div>
              </>
            )
          }

        </Row>

        <div style={{ marginTop: 10, textAlign: 'center' }}>
          <Button style={{ width: '122px' }} type="primary" htmlType="submit" loading={isShowLoading}>
            确认上传
          </Button>
        </div>
      </Form>
    </div>
  );
};

const ApkUploadForms = Form.create({ name: 'new_time_related_controls' })(ApkUploadForm);
export default withRouter(ApkUploadForms);
